import http from '@/utils/http'
// 发起登录的请求
export const getUserChannels = data => {
  return http({
    method: 'get',
    url: 'v1_1/articles',
    params: data
  })
}

// 获取所有频道的函数
export const getAllChannels = () => {
  return http({
    method: 'get',
    url: 'v1_0/channels'
  })
}
// 添加我的频道的请求函数
export const editUserChannels = (data) => {
  return http({
    method: 'PATCH',
    url: 'v1_0/user/channels',
    data: {
      channels: [data]
    }
  })
}

// 删除用户频道的请求函数
export const removeUserChannels = (data) => {
  return http({
    method: 'DELETE',
    url: 'v1_0/user/channels/' + data.id
  })
}
